/**
 * @Author: 杨光宇
 * @Date: 2019/8/15
 * @Last Modified by: 杨光宇
 * @Last Modified time: 2021-01-27 11:09:19
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 店端维护列表
export const getRescueList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/rescue/selectApplyDealer`, { params });
// 店端查询列表
export const getRescueQueryList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/rescue/selectDealer`, { params });
// 厂端经销商列表
export const getFactoryRescueList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/rescue/selectFactory`, { params });
// 保存
export const saveRescue = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/rescue/save`, params);
// 获取车辆信息
export const getOwnerInfo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/vehicleChange/findTransferList`, { params });
// 获取审核结果列表
export const getResultList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/rescue/selectDetail`, { params });

//获取所有经销商
export const getAllDealer = params => axios.get(`${SERVER.CMSCLOUD_CHANNEL}/message/dealerAttach/allList`, { params });
// 获取客户关怀救援单
export const getRescueNo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/resuceManage/getRescueListToRepair`, { params });

//救援审核列表
export const getListByPage = params => axios.post(`${SERVER.CLAIMFAC}/rPOut/getListByPage`, params);

//通过id获取审核信息
export const selectDetail = params => axios.post(`${SERVER.CLAIMFAC}/rPOut/selectDetail`, params);

// 通过，驳回，拒绝
export const assessorStatus = params => axios.post(`${SERVER.CLAIMFAC}/rPOut/assessor`, params);

//救援单导出
export const getOutExport = params => {
    return axios({
      url:`${SERVER.CLAIMFAC}/rPOut/getOutExport`,
      method: 'post',
      params: params,
      responseType: 'blob'
    });
  };
//救援单审核日志
export const getOutLog = params => axios.post(`${SERVER.CLAIMFAC}/rPOut/getOutLog`, params);